#include <jni.h>
#include <string>
#include "player/include/Play.h"

extern "C"
JNIEXPORT void JNICALL
Java_com_example_tys_myplayer_DavidPlayer_play_1pause(JNIEnv *env, jobject instance) {
    play_pause();

}

extern "C"
JNIEXPORT void JNICALL
Java_com_example_tys_myplayer_DavidPlayer_display(JNIEnv *env, jobject instance, jobject surface,
                                                  jint width, jint height) {
    init_native_window(env, surface, width, height);

}

extern "C"
JNIEXPORT void JNICALL
Java_com_example_tys_myplayer_DavidPlayer_play(JNIEnv *env, jobject instance, jstring path_) {
    const char *path = env->GetStringUTFChars(path_, 0);

    play_film(path);

    env->ReleaseStringUTFChars(path_, path);
}

extern "C"
JNIEXPORT void JNICALL
Java_com_example_tys_myplayer_DavidPlayer_release(JNIEnv *env, jobject instance) {

    release();

}








